<%-- 
    Document   : _sidebar
    Created on : Nov 16, 2013, 11:33:39 PM
    Author     : Min Tun
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<c:if test="${not empty sessionScope.ACC}">
    <c:set var="Acc" value="${sessionScope.ACC}"/>
</c:if>
<div class="col3 last body-content" style="margin-top: 50px; padding-top: 20px;">
    <div class="row">
        <c:if test="${not empty Acc}">
            <div class="account-info">
                Chào <strong>${Acc.account}</strong> [<a href="Controler?btAction=logout">Thoát</a>]
                <c:if test="${Acc.admin eq 'True'}">
                    <a href="admin.jsp" role="button">Trang quản trị</a>
                </c:if>
                <c:if test="${Acc.admin eq 'False'}">
                    <a href="post.html" role="button">Đăng bài viết</a>
                </c:if>
            </div>
        </c:if>
        <c:if test="${empty Acc}">
            <form action="Controller?btAction=login" class="loginForm" method="post">
                <span id="error" style="color: red; display: none; margin-bottom: 10px;">Tài khoản hoặc mật khẩu không đúng</span>
                <lable>Tài khoản</lable>
                <input type="text" name="txtUsername" value="" />
                <lable>Mật khẩu</lable>
                <input type="password" name="txtPassword" value="" />
                <input class="button-blue" type="submit" value="Đăng nhập" name="btAction"/>
            </form>
        </c:if>
    </div>
    <c:url var="donateLink" value="https://www.nganluong.vn/button_payment.php">
        <c:param name="receiver" value="locmxse60602@fpt.edu.vn"/>
        <c:param name="product_name" value="Ủng hộ quỷ cộng đồng."/>
        <c:param name="comments" value="Tối thiểu 10.000 VNĐ"/>
        <c:param name="return_url" value="http://localhost:80804/XML-ASS/thank.hmtl"/>
        <c:param name="price" value="10000"/>
    </c:url>
    <div class="row"style="margin-top: 20px;">
        <div id="donate" >
            <a target="_blank" href="${donateLink}">
                <img src="https://www.nganluong.vn/data/images/buttons/13.gif" width="80%" height="100px;"/>
            </a>
        </div>
    </div>
</div>
